How do I fix the require is not defined error when using Nodemailer in JavaScript